unit Td_Depotking_List;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, BaseDataListForm, cxGraphics, cxControls, cxLookAndFeels,
  cxLookAndFeelPainters, cxStyles, dxSkinsCore, dxSkinsDefaultPainters,
  dxSkinscxPCPainter, cxCustomData, cxFilter, cxData, cxDataStorage,
  cxEdit, DB, cxDBData, cxGridCustomTableView, cxGridTableView,
  cxGridDBTableView, ADODB, Menus, DBActns, StdActns, ActnList, ImgList,
  cxGridLevel, cxClasses, cxGridCustomView, cxGrid, RzLabel, ExtCtrls,
  StdCtrls, RzBckgnd, cxContainer, cxLabel;

type
  TfrmTd_Depotkind_List = class(TfrmBaseDataListForm)
    MainDataSetcode: TStringField;
    MainDataSetdepotkindid: TIntegerField;
    MainDataSetname: TStringField;
    MainDataSetkind: TIntegerField;
    MainDataSetisubid: TIntegerField;
    MainDataSetcsubid: TIntegerField;
    MainDataSetssubid: TIntegerField;
    MainDataSetrsubid: TIntegerField;
    MainDataSetasubid: TIntegerField;
    MainDataSetupflag: TIntegerField;
    MainDataSetgsubid: TIntegerField;
    MainDataSetlsubid: TIntegerField;
    MainDataGridDBTableViewcode: TcxGridDBColumn;
    MainDataGridDBTableViewname: TcxGridDBColumn;
    MainDataGridDBTableViewkind: TcxGridDBColumn;
    MainDataGridDBTableViewisubid: TcxGridDBColumn;
    MainDataGridDBTableViewcsubid: TcxGridDBColumn;
    MainDataGridDBTableViewssubid: TcxGridDBColumn;
    MainDataGridDBTableViewrsubid: TcxGridDBColumn;
    MainDataGridDBTableViewasubid: TcxGridDBColumn;
    MainDataGridDBTableViewgsubid: TcxGridDBColumn;
    MainDataGridDBTableViewlsubid: TcxGridDBColumn;
    procedure FormCreate(Sender: TObject);
    procedure PopmnuNewRecordClick(Sender: TObject);
    procedure PopmnuModifyRecordClickClick(Sender: TObject);
    procedure MainDataSetkindGetText(Sender: TField; var Text: String;
      DisplayText: Boolean);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  frmTd_Depotkind_List: TfrmTd_Depotkind_List;

implementation
 uses Td_Depotkind_Edit,MisString;
{$R *.dfm}

procedure TfrmTd_Depotkind_List.FormCreate(Sender: TObject);
begin
  FKeyField  := 'depotkindid';
  FCodeField := 'code';
  FTableName := 'td_depotkind';
  inherited;

end;

procedure TfrmTd_Depotkind_List.PopmnuNewRecordClick(Sender: TObject);
begin
  inherited;
  ShowEditForm(frmTd_Depotkind_Edit,TfrmTd_Depotkind_Edit,et_New);
end;

procedure TfrmTd_Depotkind_List.PopmnuModifyRecordClickClick(
  Sender: TObject);
begin
  inherited;
   ShowEditForm(frmTd_Depotkind_Edit,TfrmTd_Depotkind_Edit,et_Modify);
end;

procedure TfrmTd_Depotkind_List.MainDataSetkindGetText(Sender: TField;
  var Text: String; DisplayText: Boolean);
begin
  inherited;
  Text := VarToStr(GetLookupValue('ts_productkind', 'kid', 'kname', (Sender).AsString))
end;

end.
